home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat1 / ls.z / ls
Encoding:
Text File  |  2001-04-17  |  18.9 KB  |  397 lines

  1.  
  2.  
  3.  
  4. llllssss((((1111))))                                                                    llllssss((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _llll_ssss - list contents of directory
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _llll_ssss _[[[[_----_RRRR_aaaa_dddd_LLLL_CCCC_xxxx_mmmm_llll_nnnn_oooo_gggg_rrrr_tttt_uuuu_cccc_pppp_FFFF_bbbb_qqqq_iiii_ssss_ffff_1111_AAAA_MMMM_SSSS_DDDD_PPPP_]]]] _[[[[_n_a_m_e_s_]]]]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      For each directory argument, _llll_ssss lists the contents of the directory; for
  16.      each file argument, _llll_ssss repeats its name and any other information
  17.      requested.  The output is sorted alphabetically by default.  When
  18.      arguments are not given, the current directory is listed.  When several
  19.      arguments are given, the arguments are first sorted appropriately, but
  20.      file arguments appear before directories and their contents.  _llll_ssss
  21.      processes supplementary code set characters according to the locale
  22.      specified in the _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE and _LLLL_CCCC______CCCC_OOOO_LLLL_LLLL_AAAA_TTTT_EEEE environment variables [see _LLLL_AAAA_NNNN_GGGG
  23.      on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)], except as noted under the _----_bbbb and _----_qqqq options below.
  24.  
  25.      There are three major listing formats.  The default format for output
  26.      directed to a terminal is multi-column with entries sorted down the
  27.      columns.  The options _----_CCCC and _----_xxxx enable multi-column formats; and the _----_mmmm
  28.      option enables stream output format, in which files are listed across the
  29.      page, separated by commas.
  30.  
  31.      To determine output formats for the _----_CCCC, _----_xxxx, and _----_mmmm options, _llll_ssss uses an
  32.      environment variable, _CCCC_OOOO_LLLL_UUUU_MMMM_NNNN_SSSS, to determine the number of positions
  33.      available on one output line.  If this variable is not set, and the
  34.      output is directed to a terminal, the number of positions is obtained
  35.      from the terminal device.  If this information cannot be obtained, 80
  36.      columns are assumed.
  37.  
  38.      The _llll_ssss command has the following options:
  39.  
  40.      _----_RRRR   Recursively list subdirectories encountered.
  41.  
  42.      _----_aaaa   List all entries, including those that begin with a period (_....),
  43.           which are normally not listed.
  44.  
  45.      _----_AAAA   Like _----_aaaa except it does not list the . and .. directories.
  46.  
  47.      _----_dddd   If an argument is a directory, list only its name (not its
  48.           contents); often used with _----_llll to get the status of a directory.
  49.  
  50.      _----_LLLL   When listing status, if an argument is a symbolic link, list the
  51.           status of the file or directory referenced by the link rather than
  52.           that of the link itself.  This option will have no effect if the
  53.           argument is a dangling link.
  54.  
  55.      _----_HHHH   If the file is a symbolic link, list the file itself.  This is the
  56.           default behavior, except for a symbolic link to a directory in the
  57.           absence of the _----_llll option, in which case the _----_LLLL behavior is used by
  58.           default.  _----_HHHH and _----_LLLL cancel one another in command line order.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. llllssss((((1111))))                                                                    llllssss((((1111))))
  71.  
  72.  
  73.  
  74.      _----_CCCC   Multi-column output with entries sorted down the columns.  This is
  75.           the default output format.
  76.  
  77.      _----_xxxx   Multi-column output with entries sorted across rather than down the
  78.           page.
  79.  
  80.      _----_mmmm   Stream output format; files are listed across the page, separated by
  81.           commas.
  82.  
  83.      _----_llll   List in long format, giving mode, number of links, owner, group,
  84.           size in bytes, and time of last modification for each file (see
  85.           below).  If the file has an Access Control List (ACL) the mode
  86.           specification will be followed by a ``_++++''.  If the file is
  87.           a special file, the size field contains the major and minor device
  88.           numbers rather than a size.  If the file is a symbolic link, the
  89.           filename is printed followed by ``_----_>>>>'' and the pathname of the
  90.           referenced file.
  91.  
  92.      _----_nnnn   The same as _----_llll, except that the owner's _UUUU_IIII_DDDD and group's _GGGG_IIII_DDDD numbers
  93.           are printed, rather than the associated character strings.
  94.  
  95.      _----_oooo   The same as _----_llll, except that the group is not printed.
  96.  
  97.      _----_gggg   The same as _----_llll, except that the owner is not printed.
  98.  
  99.      _----_hhhh   When file sizes are printed, print them in a format that is easier
  100.           to read for large files.  The size will consist of the number of
  101.           units followed by a unit specifier ('b' for bytes, 'K' for
  102.           kilobytes, 'M' for megabytes, 'G' for gigabytes, etc.)
  103.  
  104.      _----_rrrr   Reverse the order of sort to get reverse alphabetic or oldest first
  105.           as appropriate.
  106.  
  107.      _----_tttt   Sort by time stamp (latest first) instead of by name.  The default
  108.           is the last modification time.  (See _----_uuuu and _----_cccc.)
  109.  
  110.      _----_uuuu   Use time of last access instead of last modification for sorting
  111.           (with the _----_tttt option) or printing (with the _----_llll option).
  112.  
  113.      _----_cccc   Use time of last modification of the i-node (file created, mode
  114.           changed, and so on) for sorting (_----_tttt) or printing (_----_llll).
  115.  
  116.      _----_pppp   Put a slash (_////) after each filename if the file is a directory.
  117.  
  118.      _----_FFFF   Put a slash (_////) after each filename if the file is a directory, an
  119.           asterisk (_****) if the file is executable, an equal sign (_====) if the
  120.           file is an AF_UNIX address family socket, and an ampersand (_@@@@) if
  121.           the file is a symbolic link.  Unless the _----_HHHH option is also used,
  122.           symbolic links are followed to see if they might be a directory; see
  123.           above.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. llllssss((((1111))))                                                                    llllssss((((1111))))
  137.  
  138.  
  139.  
  140.      _----_bbbb   Force printing of non-printable characters to be in the octal _\\\\_d_d_d
  141.           notation.  All multibyte characters are considered printable.
  142.  
  143.      _----_qqqq   Force printing of non-printable characters in file names as the
  144.           character question mark (_????).  All multibyte characters are
  145.           considered printable.
  146.  
  147.      _----_iiii   For each file, print the i-node number in the first column of the
  148.           report.
  149.  
  150.      _----_ssss   Give size in blocks, including indirect blocks, for each entry.
  151.           Holes in files are not included in the size.  A ``block'' is 512
  152.           bytes.
  153.  
  154.      _----_SSSS   Show the canonical device name associated with a special file, if it
  155.           can be determined.
  156.  
  157.      _----_ffff   Force each argument to be interpreted as a directory and list the
  158.           name found in each slot.  This option turns off _----_llll, _----_tttt, _----_ssss, and _----_rrrr,
  159.           and turns on _----_aaaa; the order is the order in which entries appear in
  160.           the directory.
  161.  
  162.      _----_1111   Print one entry per line of output.
  163.  
  164.      _----_MMMM   Print the mandatory access control ( MAC ) label of each entry,
  165.           enclosed in square brackets.  The _----_MMMM option may be set automatically
  166.           by setting the environment variable LABELFLAG to the (case
  167.           insensitive) string "on", other values have no effect.  If MAC is
  168.           not enabled, the square brackets will be empty.
  169.  
  170.      _----_DDDD   Print the Access Control List ( ACL ) for the entry as an _aaaa_cccc_llll(4)
  171.           string enclosed in square brackets.  If the ACL is empty or support
  172.           for ACLs is not installed, the square brackets will be empty.
  173.  
  174.      _----_PPPP   Print the capabilities for the entry as a _cccc_aaaa_pppp_aaaa_bbbb_iiii_llll_iiii_tttt_iiii_eeee_ssss(4) string
  175.           enclosed in square brackets.
  176.  
  177.      If MAC, ACL, and capabilities are all requested (-DMP in any order), the
  178.      entries are displayed in the order MAC, capabilities, ACL.
  179.  
  180.      Specifying more than one of the options in the following mutually
  181.      exclusive pairs is not considered an error: _----_CCCC and _----_llll(ell), _----_mmmm and
  182.      _----_llll(ell), _----_xxxx and _----_llll(ell), _----_CCCC and _----_1111(one), _----_cccc and _----_uuuu.  The last option
  183.      specified in each pair determines the output format.
  184.  
  185.      The mode printed under the _----_llll option consists of eleven possible
  186.      characters.  The first character may be one of the following:
  187.  
  188.           _dddd   if the entry is a directory;
  189.           _llll   if the entry is a symbolic link;
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. llllssss((((1111))))                                                                    llllssss((((1111))))
  203.  
  204.  
  205.  
  206.           _bbbb   if the entry is a block special file;
  207.           _cccc   if the entry is a character special file;
  208.           _ssss   if the entry is a _XXXX_EEEE_NNNN_IIII_XXXX semaphore;
  209.           _mmmm   if the entry is a _XXXX_EEEE_NNNN_IIII_XXXX shared data (memory);
  210.           _pppp   if the entry is a fifo (named pipe) special file;
  211.           _SSSS   if the entry is an AF_UNIX address family socket;
  212.           _----   if the entry is a regular file.
  213.  
  214.      The next 9 characters are interpreted as three sets of three bits each.
  215.      The first set refers to the owner's permissions; the next to permissions
  216.      of others in the user-group of the file; and the last to all others.
  217.      Within each set, the three characters indicate permission to read, write,
  218.      and execute the file as a program, respectively.  For a directory,
  219.      ``execute'' permission is interpreted to mean permission to search the
  220.      directory for a specified file.
  221.  
  222.      _llll_ssss _----_llll (the long list) prints its output as follows:
  223.  
  224.           _----_rrrr_wwww_xxxx_rrrr_wwww_xxxx_rrrr_wwww_xxxx  _1111 _ssss_mmmm_iiii_tttt_hhhh  _dddd_eeee_vvvv    _1111_0000_8888_7777_6666  _MMMM_aaaa_yyyy _1111_6666 _9999_::::_4444_2222 _pppp_aaaa_rrrr_tttt_2222
  225.  
  226.      Reading from right to left, you see that the current directory holds one
  227.      file, named _pppp_aaaa_rrrr_tttt_2222.  Next, the last time that file's contents were
  228.      modified was 9:42 A.M. on May 16.  The file contains 10,876 bytes.  The
  229.      owner of the file, or the user, belongs to the group _dddd_eeee_vvvv (perhaps
  230.      indicating ``development''), and their login name is _ssss_mmmm_iiii_tttt_hhhh.  The number,
  231.      in this case _1111, indicates the number of links to file _pppp_aaaa_rrrr_tttt_2222 [see _cccc_pppp(1)].
  232.      Finally, the dash and letters tell you that user, group, and others have
  233.      permissions to read, write, and execute _pppp_aaaa_rrrr_tttt_2222.
  234.  
  235.      The execute (_xxxx) symbol here occupies the third position of the three-
  236.      character sequence.  A _---- in the third position would have indicated a
  237.      denial of execution permissions.
  238.  
  239.      The permissions are indicated as follows:
  240.  
  241.           _rrrr   the file is readable
  242.           _wwww   the file is writable
  243.           _xxxx   the file is executable
  244.           _----   the indicated permission is not granted
  245.           _LLLL   mandatory locking occurs during access (the set-group-ID bit is
  246.               on and the group execution bit is off)
  247.           _ssss   the set-user-ID or set-group-ID bit is on, and the corresponding
  248.               user or group execution bit is also on
  249.           _SSSS   undefined bit-state (the set-user-ID bit is on and the user
  250.               execution bit is off)
  251.           _tttt   the 1000 (octal) bit, or sticky bit, is on [see _cccc_hhhh_mmmm_oooo_dddd(1)], and
  252.               execution is on
  253.           _TTTT   the 1000 bit is turned on, and execution is off (undefined bit-
  254.               state)
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. llllssss((((1111))))                                                                    llllssss((((1111))))
  269.  
  270.  
  271.  
  272.      For user and group permissions, the third position is sometimes occupied
  273.      by a character other than _xxxx or _----.  _ssss also may occupy this position,
  274.      referring to the state of the set-ID bit, whether it be the user's or the
  275.      group's.  The ability to assume the same ID as the user during execution
  276.      is, for example, used during login when you begin as root but need to
  277.      assume the identity of the user you login as.
  278.  
  279.      In the case of the sequence of group permissions, _LLLL may occupy the third
  280.      position.  _LLLL refers to mandatory file and record locking.  This
  281.      permission describes a file's ability to allow other files to lock its
  282.      reading or writing permissions during access.
  283.  
  284.      For other permissions, the third position may be occupied by _tttt or _TTTT.
  285.      These refer to the state of the sticky bit and execution permissions.
  286.  
  287. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  288.      An example of a file's permissions is:
  289.  
  290.           _----_rrrr_wwww_xxxx_rrrr_----_----_rrrr_----_----
  291.  
  292.      This describes a file that is readable, writable, and executable by the
  293.      user and readable by the group and others.
  294.  
  295.      Another example of a file's permissions is:
  296.  
  297.           _----_rrrr_wwww_ssss_rrrr_----_xxxx_rrrr_----_xxxx
  298.  
  299.      This describes a file that is readable, writable, and executable by the
  300.      user, readable and executable by the group and others, and allows its
  301.      user-ID to be assumed, during execution, by the user presently executing
  302.      it.
  303.  
  304.      Another example of a file's permissions is:
  305.  
  306.           _----_rrrr_wwww_----_rrrr_wwww_LLLL_----_----_----
  307.  
  308.      This describes a file that is readable and writable only by the user and
  309.      the group and can be locked during access.
  310.  
  311.      An example of a command line:
  312.  
  313.           _llll_ssss _----_aaaa
  314.  
  315.      This command prints the names of all files in the current directory,
  316.      including those that begin with a dot (_....), which normally do not print.
  317.  
  318.      Another example of a command line:
  319.  
  320.           _llll_ssss _----_aaaa_iiii_ssss_nnnn
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. llllssss((((1111))))                                                                    llllssss((((1111))))
  335.  
  336.  
  337.  
  338.      This command provides information on all files, including those that
  339.      begin with a dot (_aaaa), the i-number of the file printed in the left-hand
  340.      column (_iiii); the size (in blocks) of the files, printed in the column to
  341.      the right of the i-numbers (_ssss); finally, the report is displayed in the
  342.      numeric version of the long list, printing the UID (instead of user name)
  343.      and GID (instead of group name) numbers associated with the files.
  344.  
  345.      When the sizes of the files in a directory are listed, a total count of
  346.      blocks, including indirect blocks, excluding holes, is printed.
  347.  
  348. FFFFIIIILLLLEEEESSSS
  349.      _////_eeee_tttt_cccc_////_pppp_aaaa_ssss_ssss_wwww_dddd
  350.           user IDs for _llll_ssss _----_llll and _llll_ssss _----_oooo
  351.      _////_eeee_tttt_cccc_////_gggg_rrrr_oooo_uuuu_pppp
  352.           group IDs for _llll_ssss _----_llll and _llll_ssss _----_gggg
  353.      _////_eeee_tttt_cccc_////_mmmm_aaaa_cccc
  354.           MAC label names for _llll_ssss _----_MMMM
  355.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS_////_uuuu_xxxx_cccc_oooo_rrrr_eeee_...._aaaa_bbbb_iiii
  356.           language-specific message file [See _LLLL_AAAA_NNNN_GGGG on _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn (5).]
  357. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  358.      _cccc_hhhh_mmmm_oooo_dddd(1), _ffff_iiii_nnnn_dddd(1)
  359. EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  360.      If the environment variable _HHHH_UUUU_MMMM_AAAA_NNNN______BBBB_LLLL_OOOO_CCCC_KKKK_SSSS is set, it implies _----_hhhh.  If the
  361.      environment variable _PPPP_OOOO_SSSS_IIII_XXXX_LLLL_YYYY______CCCC_OOOO_RRRR_RRRR_EEEE_CCCC_TTTT is set, _llll_ssss processes exactly as
  362.      specified by the POSIX standeard.
  363. NNNNOOOOTTTTEEEESSSS
  364.      Unprintable characters in file names may confuse the columnar output
  365.      options.
  366.      The total block count will be incorrect if there are hard links among the
  367.      files.
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.